﻿using System;
using System.Collections.Generic;

namespace MessageSystem.Managed.Rpc
{
    class RpcFactory
    {
        private static Dictionary<Int32, RpcInvoker> allTypes = new Dictionary<Int32, RpcInvoker>(new Int32EqualityComparer());

        public static void Add(Int32 nInterfaceId, RpcInvoker invoker)
        {
            allTypes[nInterfaceId] = invoker;
        }

        public static RpcInvoker Get(Int32 nInterfaceId)
        {
            return allTypes[nInterfaceId];
        }
    }
}
